taxi.RouteManager = function() {
	this.fromAddress = undefined;
	this.toAddress = undefined;
	this._currentRoute = undefined;	
}

taxi.RouteManager.prototype.reverse = function() {
	var newFrom = this.toAddress;
	var newTo = this.fromAddress;
	this.fromAddress = undefined;
	this.toAddress = undefined;
	this.setFromAddress(newFrom);
	this.setToAddress(newTo);
}
taxi.RouteManager.prototype.setFromAddress = function(newAddress) {
	this.fromAddress = newAddress;
	$(this).trigger(taxi.FROM_CHANGE_EVENT, this.fromAddress);
}
taxi.RouteManager.prototype.setToAddress = function(newAddress) {
	this.toAddress = newAddress;
	$(this).trigger(taxi.TO_CHANGE_EVENT, this.toAddress);
}

taxi.RouteManager.prototype.getCurrentRoute = function() {
	return this._currentRoute;
}

taxi.RouteManager.prototype.setCurrentRoute = function(route) {
	return this._currentRoute = route;
}